package com.zxh.system.service.impl;

import com.zxh.system.entity.Department;
import com.zxh.system.repository.BaseRepository;
import com.zxh.system.repository.DepartmentRepository;
import com.zxh.system.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Optional;

@Service("departmentService")
public class DepartmentServiceImpl extends AbstractBaseServiceImpl<Department> implements DepartmentService {


    @Autowired
    private DepartmentRepository departmentRepository;

    @Override
    protected BaseRepository getRepository() {
        return departmentRepository;
    }

    @Override
    public Optional<Department> get(Serializable id) {
        return get("id",id);
    }
}
